<!DOCTYPE html>
<html lang="ch" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>侧边栏</title>
</head>
<body>
<aside th:fragment="sidebar-fragment(path)" class="main-sidebar sidebar-dark-primary elevation-4">
    <!-- Brand Logo -->
    <div class="brand-link">
        <img th:src="@{/admin/img/admin.png}" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
             style="background-color: #ffffff;">

        <span class="brand-text font-weight-light" style="color: #007bff">
            <a href="#">
                <b th:text="${session.admin.adminName}">未知管理员</b>
            </a>
        </span>
    </div>

    <!-- Sidebar -->
    <div class="sidebar">
        <!-- Sidebar Menu -->
        <nav class="mt-2">
            <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
                data-accordion="false">
                <li class="nav-header">首页模块</li>
                <li class="nav-item">
                    <a th:href="@{/admin/indexCarousels}"
                       th:class="${path}=='index_carousels'?'nav-link active':'nav-link'">
                        <i class="nav-icon fa fa-images"></i>
                        <p>
                            轮播图配置
                        </p>
                    </a>
                </li>

                <li class="nav-header">用户模块</li>
                <li class="nav-item">
                    <a th:href="@{/admin/users}" th:class="${path}=='users'?'nav-link active':'nav-link'">
                        <i class="nav-icon fa fa-users"></i>
                        <p>
                            用户管理
                        </p>
                    </a>
                </li>
                <li class="nav-item">
                    <a th:href="@{/admin/contactItems}" th:class="${path}=='contact_items'?'nav-link active':'nav-link'">
                        <i class="nav-icon fa fa-comment"></i>
                        <p>
                            联系事件
                        </p>
                    </a>
                </li>

                <li class="nav-header">宠物模块</li>
                <li class="nav-item">
                    <a th:href="@{/admin/petCategories}"
                       th:class="${path}=='pet_categories'?'nav-link active':'nav-link'">
                        <i class="nav-icon fa fa-paw"></i>
                        <p>分类管理</p>
                    </a>
                </li>
                <li class="nav-item">
                    <a th:href="@{/admin/addressCategories}" th:class="${path}=='address_categories'?'nav-link active':'nav-link'">
                        <i class="nav-icon fa fa-map-marker-alt"></i>
                        <p>
                            地址管理
                        </p>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" th:href="@{/admin/petPosts}" th:class="${path}=='pet_post'?'nav-link active':'nav-link'">
                        <i class="nav-icon fa fa-bookmark"></i>
                        <p>信息管理</p>
                    </a>
                </li>

                <li class="nav-header">系统管理</li>
                <li class="nav-item">
                    <a th:href="@{/admin/profile}" th:class="${path}=='profile'?'nav-link active':'nav-link'">
                        <i class="nav-icon fas fa-edit"></i>
                        <p>修改个人信息</p>
                    </a>
                </li>
                <li class="nav-item">
                    <a th:href="@{/admin/logout}" class="nav-link">
                        <i class="nav-icon fa fa-sign-out-alt"></i>
                        <p>退出</p>
                    </a>
                </li>
            </ul>
        </nav>
        <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
</aside>
</body>

</html>